home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VGAKIT50.ARJ / VGAKIT.DOC < prev    next >
Text File  |  1992-06-25  |  9KB  |  346 lines

  1. VGAKIT Version 5.0
  2.  
  3. Here is my latest SVGA/VGA info pack. I've included the .OBJ versions in case
  4. anyone who does not have an assembler wants to play with these routines.
  5.  
  6.  
  7. Biggest change this time is support for VESA defined line widths, and correct 
  8. support for bank sizes other than 64k. Old versions of VGAKIT would adjust all 
  9. bank boundries to 64k by shifting up the bank numbers on cards that have 4k or 
  10. 16k banks. To correct this I've changed the code to use an address table for 
  11. screen offsets and bank numbers, this is very close to what I do in my own 
  12. graphics code. To simplify things I've made the address table a fixed array 
  13. that supports up to 1024 scanlines. In a real program I would probably allocate 
  14. this array at runtime using malloc or some similar memory allocation function. 
  15.  
  16. The VESA support in this version is MUCH more complete.
  17.  
  18.  
  19. John Bridges  6/25/1992
  20.  
  21. Compuserve ID: John Bridges [GRASP] 75300,2137
  22. Internet: 75300.2137@compuserve.com (John Bridges)
  23.  
  24. I can be found regularly in the GRAPHVEN forum on Compuserve (where GRASP is
  25. supported).
  26.  
  27. -------------------------------------------------------------------------------
  28.  
  29.  
  30.  The included modules are:
  31.  
  32.  
  33. EXAMPLE.C    is a silly C program which shows that this code works,
  34.         it just plots a nice calculated pattern using the
  35.         point functions.
  36.  
  37.  
  38. MKEXAMP.BAT    batch file to compile and link EXAMPLE.C into EXAMPLE.EXE
  39.         for Microsoft C 6.0
  40.  
  41. STICKS.C    is another silly C program which shows that this code works,
  42.         it uses the line function to draw a LOT of lines to make a
  43.         very nice complex weave type pattern. Amazing how complex the
  44.         image gets from such a trivial program.
  45.  
  46.  
  47. MKSTICKS.BAT    batch file to compile and link STICKS.C into STICKS.EXE
  48.         for Microsoft C 6.0
  49.  
  50.  
  51. BANKS.ASM    SVGA bank switch code, used to address the beyond 64k
  52.         addressing sceams of the various SVGA chipsets. Also
  53.         includes a global variable "curbk" which is the current
  54.         hardware bank number which can be checked before each
  55.         bank switch to prevent the extra overhead of switching
  56.         into a currently selected bank. An example of this is
  57.         in the point routine in POINT.ASM which only switches
  58.         memory banks when required.
  59.                  BANKS.ASM includes the global variables ativga,tseng, tseng4
  60.         trident,video7,everex,paradise,chipstech, aheada, aheadb,
  61.         oaktech and vga512. These variables are set by the WHICHVGA()
  62.         function which must be called at program startup time to
  63.         determine which SVGA (if any) you have installed. This
  64.         function returns a 1 (true) if you have a SVGA card installed.
  65.         
  66.  
  67. MODE13X.ASM    Is the function to setup the non-standard (ie: not supported
  68.         by the BIOS) 360x480x256 mode, this mode works on virtually
  69.         VGA that is fully IBM compatable. It's a great mode for
  70.         those without SVGA capabilities.
  71.  
  72. SVGAMODE.ASM    Is a limited function which sets up 640x480x256 color
  73.         mode on a SVGA, it uses the global chipset flags to
  74.         determine the BIOS mode number.
  75.  
  76. POINT.ASM    Is a pair of simple point plotting functions,
  77.  
  78.           point(xpos,ypos,color)
  79.  
  80.         which plots a point at x,y coorinates xpos,ypos in SVGA
  81.         modes calling newbank() in BANKS.ASM to switch memory
  82.         banks when necessary.
  83.  
  84.           point13x(xpos,ypos,color)
  85.  
  86.         which plots a point at x,y coorinates xpos,ypos in 360x480
  87.         mode.  Both point functions will clip at screen boundries
  88.         correctly.
  89.  
  90.  
  91. XPOINT.ASM    Is just like POINT.ASM except that it's point functions draw
  92.         the points XOR'd to the screen.
  93.  
  94.           xpoint(xpos,ypos,color)
  95.           xpoint13x(xpos,ypos,color)
  96.  
  97.  
  98. RDPOINT.ASM    Is just like POINT.ASM except that instead of plotting points
  99.         it reads the color of screen pixel.
  100.  
  101.           color=rdpoint(xpos,ypos)
  102.           color=rdpoint13x(xpos,ypos)
  103.  
  104. LINE.ASM    Is a line plotting function callable from C, you pass it the
  105.         coordinates for the two end points of the line, the color to
  106.         draw the line in and the function to call to plot each point.
  107.  
  108.           bline(x1,y1,x2,y2,color,xpoint);
  109.  
  110.  
  111. here is a list of VGA Chipset producers and their BIOS mode numbers:
  112.  
  113. =======================================================
  114.  
  115. ACUMOS
  116. ------
  117.         width        height        colors 
  118.         -----        ------        ------ 
  119. 0x59          800           600             2 
  120. 0x58          800           600            16 
  121. 0x5e          640           400           256 
  122. 0x5f          640           480           256 
  123. 0x5c          800           600           256 
  124. 0x5d         1024           768            16 
  125.  
  126. AX=MODE
  127.  
  128. =======================================================
  129.  
  130. AHEAD
  131. -----
  132.         width        height        colors 
  133.         -----        ------        ------ 
  134. 0x6A          800           600            16 
  135. 0x71          800           600            16 
  136. 0x74         1024           768            16 
  137. 0x60          640           400           256 
  138. 0x61          640           480           256 
  139. 0x62          800           600           256 
  140. 0x63         1024           768           256 
  141.  
  142. AX=MODE
  143.  
  144. =======================================================
  145.  
  146. ATI
  147. ---
  148.         width        height        colors 
  149.         -----        ------        ------ 
  150. 0x54          800           600            16 
  151. 0x65         1024           768            16 
  152. 0x61          640           400           256 
  153. 0x62          640           480           256 
  154. 0x63          800           600           256 
  155. 0x64         1024           768           256 
  156.  
  157. AX=MODE
  158.  
  159. =======================================================
  160.  
  161. CHIPS & TECH
  162. ------------
  163.         width        height        colors 
  164.         -----        ------        ------ 
  165. 0x70          800           600            16 
  166. 0x72         1024           768            16 
  167. 0x78          640           400           256 
  168. 0x79          640           480           256 
  169. 0x7b          800           600           256 
  170.  
  171. AX=MODE
  172.  
  173. =======================================================
  174.  
  175. EVEREX
  176. ------
  177.         width        height        colors 
  178.         -----        ------        ------ 
  179. 0x01          752           410            16
  180. 0x02          800           600            16 
  181. 0x11         1280           350             4
  182. 0x12         1280           600             4
  183. 0x13          640           350           256
  184. 0x14          640           400           256 
  185. 0x15          512           480           256
  186. 0x20         1024           768            16 
  187. 0x30          640           480           256 
  188. 0x31          800           600           256 
  189. 0x32         1024           768           256 
  190.  
  191. AX=0x70 BL=MODE
  192.  
  193. =======================================================
  194.  
  195. GENOA GVGA
  196. ----------
  197.         width        height        colors 
  198.         -----        ------        ------ 
  199. 0x7c              512           512            16
  200. 0x59              720           512            16
  201. 0x79 or 0x6a      800           600            16 
  202. 0x7d              512           512            256
  203. 0x5b              640           350            256
  204. 0x7e              640           400            256
  205. 0x5c              640           480            256
  206. 0x5d              720           512            256
  207. 0x5e or 0x6c      800           600            256
  208. 0x7f             1024           768            4
  209. 0x5f             1024           768            16 
  210.  
  211. AX=MODE
  212.  
  213. =======================================================
  214.  
  215. NCR
  216. ---
  217.         width        height        colors 
  218.         -----        ------        ------ 
  219. 0x59          800           600             2 
  220. 0x58          800           600            16 
  221. 0x5e          640           400           256 
  222. 0x5f          640           480           256 
  223. 0x5c          800           600           256 
  224. 0x5a         1024           768             2 
  225. 0x5d         1024           768            16 
  226.  
  227. AX=MODE
  228.  
  229. =======================================================
  230.  
  231. OAK TECH
  232. --------
  233.         width        height        colors 
  234.         -----        ------        ------ 
  235. 0x52          800           600            16 
  236. 0x53          640           480           256 
  237. 0x54          800           600           256 
  238. 0x56         1024           768            16 
  239. 0x59         1024           768           256 
  240. 0x58         1280          1024            16 
  241.  
  242. AX=MODE
  243.  
  244. =======================================================
  245.  
  246. PARADISE
  247. --------
  248.         width        height        colors 
  249.         -----        ------        ------ 
  250. 0x59          800           600             2 
  251. 0x58          800           600            16 
  252. 0x5e          640           400           256 
  253. 0x5f          640           480           256 
  254. 0x5d         1024           768            16 
  255. 0x5c          800           600           256 
  256.  
  257. AX=MODE
  258.  
  259. =======================================================
  260.  
  261. TRIDENT
  262. -------
  263.         width        height        colors 
  264.         -----        ------        ------ 
  265. 0x5b          800           600            16 
  266. 0x5f         1024           768            16 
  267. 0x5c          640           400           256 
  268. 0x5d          640           480           256 
  269. 0x5e          800           600           256 
  270.  
  271. AX=MODE
  272.  
  273. =======================================================
  274.  
  275. TRIDENT 8900
  276. ------------
  277.         width        height        colors 
  278.         -----        ------        ------ 
  279. 0x5b          800           600            16 
  280. 0x5c          640           400           256 
  281. 0x5d          640           480           256 
  282. 0x5e          800           600           256 
  283. 0x60         1024           768             4
  284. 0x5f         1024           768            16 
  285. 0x62         1024           768           256 
  286.  
  287. AX=MODE
  288.  
  289. =======================================================
  290.  
  291. TSENG  (Genoa, Orchid, Willow)
  292. -----
  293.         width        height        colors 
  294.         -----        ------        ------ 
  295. 0x29          800           600            16 
  296. 0x37         1024           768            16 
  297. 0x2d          640           350           256 
  298. 0x2e          640           480           256 
  299. 0x2f          720           512           256
  300. 0x30          800           600           256 
  301.  
  302. AX=MODE
  303.  
  304. =======================================================
  305.  
  306. TSENG 4000
  307. ----------
  308.         width        height        colors 
  309.         -----        ------        ------ 
  310. 0x29          800           600            16 
  311. 0x37         1024           768            16 
  312. 0x2d          640           350           256
  313. 0x2f          640           400           256 
  314. 0x2e          640           480           256 
  315. 0x30          800           600           256 
  316. 0x38         1024           768           256 
  317.  
  318. AX=MODE
  319.  
  320. =======================================================
  321.  
  322. VIDEO7
  323. ------
  324.         width        height        colors 
  325.         -----        ------        ------ 
  326. 0x60          752           410            16
  327. 0x61          720           540            16
  328. 0x62          800           600            16 
  329. 0x63         1024           768             2 
  330. 0x64         1024           768             4
  331. 0x65         1024           768            16 
  332. 0x66          640           400           256 
  333. 0x67          640           480           256 
  334. 0x68          720           540           256
  335. 0x69          800           600           256 
  336. 0x6A         1024           768           256 
  337.  
  338. AX=0x6f05 BL=MODE
  339.  
  340. =======================================================
  341.  
  342.  
  343.  
  344.  
  345.  
  346.